package com.breaking.second.utils.compat;

import android.view.Gravity;
import android.view.Window;
import android.view.WindowManager;

public class DialogCompat {
    public static void init(Window window) {
        if (window == null) return;
        WindowManager.LayoutParams layoutParams = window.getAttributes();
        layoutParams.gravity = Gravity.CENTER;
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // Adjust width as needed
        layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT; // Let height adjust to content
        window.setAttributes(layoutParams);
    }

}
